﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FormulaEdit.aspx.cs" Inherits="Indicators_FormulaEdit" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>基础数据类别维护</title>
    <base target="_self" />
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
    <!--#include file="../Js/KeyControl.js"-->

    <script src="../JS/calendar.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">

        function BtnSubmit() {
            var sCode = form1.txtName.value;
            var sName = form1.txtFormula.value;

            if (sCode == "") {
                form1.txtName.focus();
                alert("编码不能为空！");
                return;
            }

            if (sName == "") {
                form1.txtFormula.focus();
                alert("名称不能为空！");
                return;
            }

            var btnSave = window.document.getElementById("SaveData");
            if (btnSave != null)
                btnSave.click();
        }
        function FormulaClick() {
            debugger;
            var txt = window.document.getElementById("txtFormula");
            var tp = txt.value.replace(/\+/g, '^');
            var sFeatures = "dialogHeight:600px;dialogWidth:800px;resizeable:no;help:no;status:no";
            document.getElementById("txtFormula").value = showModalDialog("Formula_Edit.aspx?txt=" + tp, window, sFeatures);
        }
			
    </script>

</head>
<body style="background-image: url('../images/hit_bg.gif');">
    <% 
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.Expires = 0;
        Response.CacheControl = "no-cache";
    %>
    <form id="form1" runat="server">
    <table style="width: 98%;" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr style="height: 6;">
            <td>
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="327AC6">
        <tr style="background-color: #F9F9FB; height: 25;">
            <td align="right">
                &nbsp;<strong>名称：</strong>
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtName" runat="server" CssClass="TextBox" MaxLength="50" TabIndex="1"></asp:TextBox>
            </td>
        </tr>
        <tr style="background-color: #F9F9FB; height: 25;">
            <td align="right">
                &nbsp;<strong>公式：</strong>
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtFormula" runat="server" CssClass="TextBox" MaxLength="50" TabIndex="2"></asp:TextBox><font
                    color="#ff0000"><input
                        id="btnAddFormula" type="button" class="botton02" value=" . . . " onclick="FormulaClick();" />*</font>
            </td>
        </tr>
        <tr style="background-color: #F9F9FB; height: 25;">
            <td align="right">
                &nbsp;<strong>类型：</strong>
            </td>
            <td>
                &nbsp;<asp:DropDownList ID="DLLtype" runat="server">
                    <asp:ListItem Value="0">请选择...</asp:ListItem>
                    <asp:ListItem Value="1">字段</asp:ListItem>
                    <asp:ListItem Value="2">公式项</asp:ListItem>
                    <asp:ListItem Value="3">指标项</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr style="background-color: #F9F9FB; height: 25;">
            <td align="right">
                &nbsp;<strong>满分：</strong>
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtOutOf" CssClass="TextBox" MaxLength="50" TabIndex="3" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr style="height: 30; background-color: #F9F9FB">
            <td>
            </td>
            <td>
                <input id="SaveData" type="button" style="width: 0; height: 0;" class="button02"
                    runat="server" value="提交" onserverclick="SaveData_ServerClick" />
                <input type="button" id="Button1" value="提交" class="button02" onclick="BtnSubmit();" />
                <input type="button" id="Button2" value="退出" class="button02" onclick="window.close();" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
